
/* Generated by Interface Builder */

/*
 *
 $Author$
 $Header$
 *
 $Log$
 */


#import "GameBoardView.h"
#import	"GameInterface.h"
#import <appkit/graphics.h>
#import	<dpsclient/psops.h>

#import	<assert.h>


@implementation GameBoardView


- mouseDown:( NXEvent* )theEvent {

	NXPoint	clickPoint = theEvent->location;
	
	
	[ self convertPoint:&clickPoint fromView:nil ];
	
	if( theEvent->data.mouse.click == 1 )
		[( GameInterface* )gameInterface click:&clickPoint ];
	
	else
		if( theEvent->data.mouse.click == 2 )
			[( GameInterface* )gameInterface doubleClick:&clickPoint ];

	return self;
}


- drawSelf:(const NXRect *)rects :(int)rectCount {

	
	assert( gameInterface );
	
	PSsetgray( NX_WHITE );
	NXRectFillList( rects, rectCount );
	[( GameInterface* )gameInterface gameBoardDraw ];
	
	return self;
}


@end
